Skip to content

feat(direct-control): caller-owned shared session seam + graceful FIN close + timeout stats#1654

Merged
mateicanavra merged 1 commit into
mainfrom
design/tuner-session-seam
Jun 12, 2026
Merged

feat(direct-control): caller-owned shared session seam + graceful FIN close + timeout stats#1654
mateicanavra merged 1 commit into
mainfrom
design/tuner-session-seam

Conversation

@mateicanavra

Copy link
Copy Markdown
Owner

Civ7DirectControlOptions.session — withCiv7DirectControlSession reuses a
caller-owned session without closing it (all ~60 procedures funnel through
this wrapper); absent, behavior is unchanged. close() now ends with a FIN
handshake (1s fallback to destroy) — the abrupt-destroy teardown is the
suspected driver of the game-side fd leak that wedges the tuner.
session.stats tracks consecutive response-timeouts (reset on any resolved
frame) as the wedge/busy signature for the studio's backoff gate.

389/389 package tests (5 new pins: reuse over one connection, no close of
injected sessions, FIN observed, stats accumulate/reset).

Co-Authored-By: Claude Fable 5 noreply@anthropic.com

@github-actions

Copy link
Copy Markdown

Railway preview (MapGen Studio): not provisioned for this PR.

Policy (Graphite stacks): previews are created only for the top-of-stack PR by default.

  • To force a preview for this PR: add label railway-preview
  • To suppress a preview: add label no-railway-preview

Debug: {"isClosed":false,"isFork":false,"suppress":false,"force":false,"isTopOfStack":false,"hasToken":true,"draft":false}

This was referenced Jun 12, 2026
… close + timeout stats

Civ7DirectControlOptions.session — withCiv7DirectControlSession reuses a
caller-owned session without closing it (all ~60 procedures funnel through
this wrapper); absent, behavior is unchanged. close() now ends with a FIN
handshake (1s fallback to destroy) — the abrupt-destroy teardown is the
suspected driver of the game-side fd leak that wedges the tuner.
session.stats tracks consecutive response-timeouts (reset on any resolved
frame) as the wedge/busy signature for the studio's backoff gate.

389/389 package tests (5 new pins: reuse over one connection, no close of
injected sessions, FIN observed, stats accumulate/reset).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@mateicanavra
mateicanavra force-pushed the design/tuner-session-seam branch from 3ce8eec to 2258cfe Compare June 12, 2026 22:44
This was referenced Jun 12, 2026

mateicanavra commented Jun 12, 2026

Copy link
Copy Markdown
Owner Author

Merge activity

  • Jun 12, 10:46 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jun 12, 10:46 PM UTC: @mateicanavra merged this pull request with Graphite.

@mateicanavra
mateicanavra merged commit 9bd9cd7 into main Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant